<script lang="ts" setup>
import { ref } from "vue";
import Child from './Child.vue'
defineOptions({
    name: "index",
});
//--================= Data
let a = ref(100);
let b = ref(200);

//--================= Methods

function add(value: number) {
    a.value += value;
}

//--================= Other


</script>

<template>
    <div class="main">
        <h3>父组件</h3>
        a:{{ a }} <br>
        b:{{ b }} <br>
        <Child :a="a" :b="b" v-bind="{ x: 1000, y: 2000 }" :add="add" />
    </div>
</template>

<style scoped>
.main {
    background-color: #eee;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
    min-height: 500px;
}
</style>
